package cn.powerone.scm.domain;

import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import cn.powerone.common.annotation.Excel;
import cn.powerone.common.core.domain.BaseEntity;

/**
 * 供应商对象 scm_supplier
 * 
 * @author PowerOne
 * @date 2025-06-23
 */
@Getter
@Setter
public class ScmSupplier extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 供应商编号 */
    @Excel(name = "供应商编号")
    private String supplierNo;

    /** 供应商名称 */
    @Excel(name = "供应商名称")
    private String name;

    /** 供应商昵称（缩写） */
    @Excel(name = "供应商缩写")
    private String nickname;

    /** 法人 */
    @Excel(name = "负责人", type = Excel.Type.ALL)
    private String legalPerson;

    /** 是否为国外客户 */
    @Excel(name = "国内外客户(国内，国外)", type = Excel.Type.ALL, readConverterExp = "Y=国外,N=国内")
    private String foreignInd;

    /** 国家 */
    @Excel(name = "国家", type = Excel.Type.ALL)
    private String country;

    /**  客户标签、商品 */
//    @Excel(name = " 客户标签、商品")
    private String tags;

    /** 手机 */
//    @Excel(name = "联系电话")
    private String mobile;

    /** 电话 */
    @Excel(name = "联系电话")
    private String telephone;

    @Excel(name = "邮箱")
    private String email ;

    /** 成交状态0未成交1成交 */
//    @Excel(name = "成交状态0未成交1成交")
    private Long dealStatus;

    /** 首次成交时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "首次成交时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date firstDealTime;

    /** 地址 */
    @Excel(name = "地址")
    private String address;

    /** 区分 */
//    @Excel(name = "区分")
    private String area;

    /** 统一社会信用代码 */
    @Excel(name = "统一社会信用代码", type = Excel.Type.ALL)
    private String registerNo;

    /** 开户行名称 */
    @Excel(name = "开户行名称", type = Excel.Type.ALL)
    private String bankName;

    /** 开户行账号 */
    @Excel(name = "开户行账号", type = Excel.Type.ALL)
    private String bankAccount;

    /** 负责人ID */
//    @Excel(name = "负责人ID")
    private Long ownerUserId;

    /** 负责人姓名 */
    @Excel(name = "责任担当")
    private String ownerUserName;

    /** 备注 */
    @Excel(name = "备注")
    private String remark;

    /** 供应商联系人信息 */
    private List<ScmSupplierContacts> scmSupplierContactsList;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("supplierNo", getSupplierNo())
            .append("name", getName())
            .append("nickname", getNickname())
            .append("legalPerson", getLegalPerson())
            .append("foreignInd", getForeignInd())
            .append("country", getCountry())
            .append("tags", getTags())
            .append("mobile", getMobile())
            .append("telephone", getTelephone())
            .append("dealStatus", getDealStatus())
            .append("firstDealTime", getFirstDealTime())
            .append("address", getAddress())
            .append("area", getArea())
            .append("bankName", getBankName())
            .append("bankAccount", getBankAccount())
            .append("ownerUserId", getOwnerUserId())
            .append("ownerUserName", getOwnerUserName())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("scmSupplierContactsList", getScmSupplierContactsList())
            .toString();
    }
}
